package com.ruoyi.article.mapper;

import com.ruoyi.article.domain.Material;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; // 正确 不要导入其他包的@Param注解（如Spring的）
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;


public interface MaterialMapper {




    // 新增参数 id
    void addMaterialPhoto(@Param("id") Long id, @Param("filePath") String filePath);

    int uploadPictureStatus(@Param("id") Long id,@Param("isSubmit")Integer isSubmit);

    int deletePicture(@Param("id") Long id);

    @Select("select * from material")
    List<Material> listMaterials();


    @Select("select url from material where is_submit=#{i}")
    List<String> getPhotoUrl(@Param("i")  int i);
}
